package main

import "fmt"

func main() {

	var s Service = new(GameService)
	s.Start()
	s.Log("hello")
}

type Service interface {
	Start()
	Log(string)
}

type Logger struct {
}

type GameService struct {
	//GameService拥有Logger的接口实现
	Logger
}

func (l *Logger) Log(str string) {
	fmt.Println("info:", str)
}

func (g *GameService) Start() {
	fmt.Println("start...")
}
